package com.lagou.rpc.consumer.service;

import com.lagou.rpc.api.IUserService;
import com.lagou.rpc.consumer.proxy.RpcClientProxy;
import com.lagou.rpc.pojo.User;
import org.springframework.stereotype.Service;

/**
 * @author 郑样平
 * @date 2021/6/7  21:38
 */

@Service
public class UserServerImpl  {

    IUserService userService = (IUserService) RpcClientProxy.createProxy(IUserService.class);

        public User getById(int id) {
            return userService.getById(id);
    }
}
